<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>highlight.as</title>
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (ActionScript 2.0) - Theme (Breeze Light)"/>
</head><body style="background-color:#ffffff;color:#1f1c1b"><pre>
<span style="color:#644a9b;">createTextField</span>(<span style="color:#bf0303;">&quot;greet&quot;</span>, <span style="color:#b08000;">0</span>, <span style="color:#b08000;">0</span>, <span style="color:#b08000;">0</span>, <span style="color:#b08000;">100</span>, <span style="color:#b08000;">100</span>);
greet.<span style="color:#644a9b;">text</span> = <span style="color:#bf0303;">&quot;Hello, world&quot;</span>;

<span style="font-weight:bold;">class</span> com.<span style="color:#644a9b;">example</span>.<span style="color:#644a9b;">Greeter</span> <span style="font-weight:bold;">extends</span> <span style="color:#644a9b;font-weight:bold;">MovieClip</span>
{
    <span style="font-weight:bold;">public</span> <span style="font-weight:bold;">function</span> <span style="color:#644a9b;">Greeter</span>()
    {
        <span style="font-weight:bold;">var</span> txtHello:<span style="color:#644a9b;font-weight:bold;">TextField</span> = <span style="color:#0057ae;font-weight:bold;">this</span>.<span style="color:#644a9b;">createTextField</span>(<span style="color:#bf0303;">&quot;txtHello&quot;</span>, <span style="color:#b08000;">0</span>, <span style="color:#b08000;">0</span>, <span style="color:#b08000;">0</span>, <span style="color:#b08000;">100</span>, <span style="color:#b08000;">100</span>);
        txtHello.<span style="color:#644a9b;">text</span> = <span style="color:#bf0303;">&quot;Hello, world&quot;</span>;
    }
}

<span style="font-weight:bold;">var</span> txtHello:<span style="color:#644a9b;font-weight:bold;">TextField</span> = <span style="font-weight:bold;">new</span> <span style="color:#644a9b;font-weight:bold;">TextField</span>();
txtHello.<span style="color:#644a9b;">text</span> = <span style="color:#bf0303;">&quot;Hello World&quot;</span>;
<span style="color:#0057ae;font-weight:bold;">this</span>.<span style="color:#644a9b;">addChild</span>(txtHello);

<span style="font-weight:bold;">package</span><span style="color:#ff5500;"> com.example</span>
{
    <span style="font-weight:bold;">import</span><span style="color:#ff5500;"> flash.text.TextField;</span>
    <span style="font-weight:bold;">import</span><span style="color:#ff5500;"> flash.display.Sprite;</span>

    <span style="font-weight:bold;">public</span> <span style="font-weight:bold;">class</span> Greeter <span style="font-weight:bold;">extends</span> Sprite
    {
        <span style="font-weight:bold;">public</span> <span style="font-weight:bold;">function</span> <span style="color:#644a9b;">Greeter</span>()
        {
            <span style="font-weight:bold;">var</span> txtHello:<span style="color:#644a9b;font-weight:bold;">TextField</span> = <span style="font-weight:bold;">new</span> <span style="color:#644a9b;font-weight:bold;">TextField</span>();
            txtHello.<span style="color:#644a9b;">text</span> = <span style="color:#bf0303;">&quot;Hello World&quot;</span>;
            <span style="color:#644a9b;">addChild</span>(txtHello);
        }
    }
}

<span style="font-weight:bold;">var</span> myObject:<span style="color:#0057ae;">Object</span> = <span style="font-weight:bold;">new</span> <span style="color:#0057ae;">Object</span>();
<span style="font-weight:bold;">var</span> myObject = {};
<span style="font-weight:bold;">var</span> myString:<span style="color:#0057ae;">String</span> = <span style="color:#bf0303;">&quot;Hello Wikipedia!&quot;</span>; <span style="color:#898887;">// This would automatically set the variable as a string.</span>
<span style="font-weight:bold;">var</span> myNumber:<span style="color:#644a9b;font-weight:bold;">Number</span> = <span style="color:#b08000;">5</span>; <span style="color:#898887;">// This would do the same for a number.</span>
<span style="font-weight:bold;">var</span> myObject:<span style="color:#0057ae;">Object</span> = {Param1:<span style="color:#bf0303;">&quot;Hi!&quot;</span>, Param2:<span style="color:#b08000;">76</span>}; <span style="color:#898887;">//This creates an object with two variables.</span>
<span style="color:#898887;">// Param1 is a string with the data of &quot;Hi!&quot;,</span>
<span style="color:#898887;">// and Param2 is a number with the data of 76.</span>
<span style="font-weight:bold;">var</span> myArray:<span style="color:#0057ae;">Array</span> = [<span style="color:#b08000;">5</span>,<span style="color:#bf0303;">&quot;Hello!&quot;</span>,{a:<span style="color:#b08000;">5</span>, b:<span style="color:#b08000;">7</span>}]; <span style="color:#898887;">//This is the syntax for automatically creating an Array.</span>
<span style="color:#898887;">//It creates an Array with 3 variables.</span>
<span style="color:#898887;">//The first (0) is a number with the value of 5,</span>
<span style="color:#898887;">//the second (1) is a string with the value of &quot;Hello!&quot;,</span>
<span style="color:#898887;">//and the third (2) is an object with {a:5, b:7}.</span>

<span style="font-weight:bold;">var</span> item1:<span style="color:#0057ae;">String</span>=<span style="color:#bf0303;">&quot;ABC&quot;</span>;
<span style="font-weight:bold;">var</span> item2:<span style="color:#0057ae;">Boolean</span>=<span style="color:#aa5500;font-weight:bold;">true</span>;
<span style="font-weight:bold;">var</span> item3:<span style="color:#644a9b;font-weight:bold;">Number</span>=<span style="color:#b08000;">12</span>;
<span style="font-weight:bold;">var</span> item4:<span style="color:#0057ae;">Array</span>=[<span style="color:#bf0303;">&quot;a&quot;</span>,<span style="color:#bf0303;">&quot;b&quot;</span>,<span style="color:#bf0303;">&quot;c&quot;</span>];
<span style="font-weight:bold;">var</span> item5:<span style="color:#0057ae;">Object</span>={name:<span style="color:#bf0303;">&quot;Actionscript&quot;</span>,version:<span style="color:#bf0303;">&quot;3.0&quot;</span>};
<span style="font-weight:bold;">var</span> item6:<span style="color:#644a9b;font-weight:bold;">XML</span> = &lt;node&gt;&lt;child/&gt;&lt;/node&gt;; <span style="color:#898887;">//Note that the primitive XML is not quoted</span>

<span style="font-weight:bold;">var</span> item1:<span style="color:#644a9b;font-weight:bold;">XML</span>=<span style="font-weight:bold;">new</span> <span style="color:#644a9b;font-weight:bold;">XML</span>(<span style="color:#bf0303;">&quot;&lt;node&gt;&lt;child/&gt;&lt;/node&gt;&quot;</span>);
<span style="font-weight:bold;">var</span> item2:<span style="color:#644a9b;font-weight:bold;">XML</span>=item1;
item2.<span style="color:#644a9b;">firstChild</span>.<span style="color:#644a9b;">attributes</span>.<span style="color:#644a9b;">value</span>=<span style="color:#b08000;">13</span>;
<span style="color:#898887;">//item1 now equals item2 since item2 simply points to what item1 points to.</span>
<span style="color:#898887;">//Both are now:</span>
<span style="color:#898887;">//&lt;node&gt;&lt;child value=&quot;13&quot;/&gt;&lt;/node&gt;</span>

<span style="font-weight:bold;">private</span> <span style="font-weight:bold;">function</span> <span style="color:#644a9b;">getNeighbours</span>(_arg1:<span style="color:#644a9b;font-weight:bold;">int</span>, _arg2:<span style="color:#644a9b;font-weight:bold;">int</span>):<span style="color:#0057ae;">Array</span>{
  <span style="font-weight:bold;">var</span> _local3:<span style="color:#0057ae;">Array</span> = -(((<span style="color:#aa5500;font-weight:bold;">null</span> - !NULL!) % ~(<span style="color:#aa5500;font-weight:bold;">undefined</span>)));
  <span style="font-weight:bold;">var</span> _local4:*;
  <span style="font-weight:bold;">var</span> _local5:*;
  <span style="font-weight:bold;">var</span> _local6:*;
  _local3 = <span style="font-weight:bold;">new</span> <span style="color:#0057ae;">Array</span>();
  _local4 = <span style="color:#b08000;">0</span>;
  <span style="font-weight:bold;">for</span> (;<span style="color:#898887;">//unresolved jump</span>
  , _arg2 &lt; <span style="color:#b08000;">8</span>;_local4++) {
    _local5 = (_arg1 + <span style="color:#644a9b;font-weight:bold;">int</span>(!NULL!));
    _local6 = (_arg2 + <span style="color:#644a9b;font-weight:bold;">int</span>(!NULL!));
    <span style="font-weight:bold;">if</span> (<span style="color:#aa5500;font-weight:bold;">true</span>){
      _arg1 = (((<span style="color:#898887;">//unresolved nextvalue or nextname &lt;&lt; !NULL!) + !NULL!) </span>
&lt;&lt; <span style="color:#aa5500;font-weight:bold;">undefined</span>);
      _arg1 = (!(!NULL!) ^ !NULL!);
      (!NULL! <span style="font-weight:bold;">instanceof</span> !NULL!);
      <span style="font-weight:bold;">var</span> _local1 = (((!NULL! as !NULL!) + !NULL!) == <span style="color:#0057ae;font-weight:bold;">this</span>);
      <span style="font-weight:bold;">if</span> (!(!NULL! == !NULL!)){
        -((<span style="color:#aa5500;font-weight:bold;">true</span> &lt;&lt; !NULL!)).<span style="color:#644a9b;">push</span>(<span style="color:#644a9b;">Cell</span>(cells[_local5][_local6]));
      }
    }
    <span style="font-weight:bold;">if</span> (!<span style="color:#aa5500;font-weight:bold;">true</span>){
      (_local6 &lt; <span style="color:#b08000;">0</span>);
      (_local6 &lt; <span style="color:#b08000;">0</span>);
      (_local5 &lt; <span style="color:#b08000;">0</span>);
    }
  }
<span style="font-weight:bold;">return</span> (_local3);
}
</pre></body></html>
